package com.xiaotu.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class MovieType {
    private Integer id;
    private String name;
    private String type;
    @JsonIgnore
    private List<Movie> movieList;
    @JsonIgnore
    public List<Movie> getNewMovieList(){
        this.movieList = new ArrayList<>();
        return this.movieList;
    }
    @JsonIgnore
    public List<Movie> setMovieList(List<Movie> list){
        this.movieList .addAll(list);
        return   this.movieList ;
    }
    @JsonIgnore
    public List<Movie> setMovieList(Movie movie){
        this.movieList.add(movie);
        return this.movieList;
    }
}
